#!/bin/bash
#下载jdk
yum -y install java
#解压到根目录
tar -xf jdk-8u401-linux-x64.tar.gz
sleep 2
#改名
# mv jdk1.8.0_401 /usr/local/jdk1.8
# #配置 jdk 环境
# cat >> /etc/profile << EOF
# #set java enviroment
# JAVA_HOME=/usr/local/jdk1.8
# CLASSPATH=.:$JAVA_HOME/lib.tools.jar
# PATH=$JAVA_HOME/bin:$PATH
# export JAVA_HOME CLASSPATH PATH
# EOF
#重置环境
source /etc/profile
#下载 apache-tomcat-9.0.65.tar
#wget http://192.168.3.200/Software/apache-tomcat-9.0.87.tar.gz
#解压
tar -xf apache-tomcat-9.0.87.tar.gz
sleep 3
#改名
mv apache-tomcat-9.0.87  /opt/tomcat1
#开启
bash /opt/tomcat1/bin/startup.sh